package cc.vv.lkimagecomponent2.lib;


import cc.vv.lkimagecomponent2.glideLib.GlideEngine;

/**
 * Load插件 工厂。提供具体的内核引擎。
 *
 * @author dupeng dupeng@vv.cc
 * @date 2018/3/14
 */

public class LoadFactory {
    private static LoadFactory instance;

    public static LoadFactory getInstance() {
        if (instance == null) {
            synchronized (LoadFactory.class) {
                if (instance == null) {
                    instance = new LoadFactory();
                }
            }
        }
        return instance;
    }

    /**
     * 获取图片加载引擎.要替换glide框架，只需要实现IEngine,这里返回换掉。
     *
     * @return
     */
    public IEngine getEngine() {
        return GlideEngine.getInstance();
    }
}
